package com.example.lenovo.appstore.activity;

import androidx.appcompat.app.AppCompatActivity;
import butterknife.Bind;
import butterknife.ButterKnife;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;

import com.example.lenovo.appstore.R;
import com.example.lenovo.appstore.base.BaseActivity;
import com.example.lenovo.appstore.utils.AppContext;
import com.example.lenovo.appstore.utils.StatusBarUtil;
import com.example.lenovo.appstore.view.TitleBarView;

public class SaveCenterActivity extends BaseActivity implements View.OnClickListener {
    @Bind(R.id.save_center_title)
    TitleBarView titleBarView;
    @Bind(R.id.change_PWD)
    RelativeLayout change_PWD;//修改密码
    @Bind(R.id.change_user)
    RelativeLayout change_user;//账户变更

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_save_center);
        ButterKnife.bind(this);
        initView();
    }

    @Override
    protected void initView() {
        titleBarView.setTitle(AppContext.getInstance().getResources().getString(R.string.save_center));
        titleBarView.showBackButton(true);
        StatusBarUtil.setStatusBarLightMode(getWindow());
        initListener();
    }

    @Override
    protected void initListener() {
        change_PWD.setOnClickListener(this);
        change_user.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.change_PWD:
                Intent changePWD=new Intent(SaveCenterActivity.this,ChangePWDActivity.class);
                startActivity(changePWD);
                break;
            case R.id.change_user:
                Intent changeAccout=new Intent(SaveCenterActivity.this,ChangeAccoutActivity.class);
                startActivity(changeAccout);
                break;



        }
    }
}
